﻿using System;
using System.Collections.Generic;
using System.Text;
using ArkEC.CoreCom.Runtime;
using ArkEC.SEMs.DataAccess.UM.Implement.Access;
using ArkEC.SEMs.DataAccess.UM.Implement.MySQL;

namespace ArkEC.SEMs.DataAccess.UM
{
    /// <summary>
    /// 用户数据库操作的工厂类
    /// </summary>
    public class UserDAFactory
    {
        /// <summary>
        /// 创建语言种类数据库操作接口
        /// </summary>
        /// <returns></returns>
        public static IUserDA CreateUserDA()
        {
            IUserDA iface = null;
            string connType = RunSetting.ConnType;

            switch (connType)
            {
                case "OleDb":
                    iface = new UserDA_Acs();
                    break;
                case "MySQL":
                    iface = new UserDA_MySQL();
                    break;
                default:
                    break;
            }

            return iface;
        }
    }
}
